<?php

namespace App\Services\Questions\Type;

use App\Models\Question;
use App\Services\Questions\BaseQuestion;
use Illuminate\Http\Request;

class Subsystem extends BaseQuestion
{
    public function store(Request $request)
    {
        $request->validate($this->validate($request));

        $request->offsetSet('user_id', auth('api')->id());

        parent::store($request);
    }

    public function validate($request)
    {
        $request->offsetUnset('answer');
        return [
            'content' => ['required'],
        ];
    }

    public function update(Request $request, Question $question)
    {
        $request->validate($this->validate($request));

        parent::update($request,$question);
    }
}
